<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page
	import="com.sun.org.apache.bcel.internal.generic.INSTANCEOF,com.moment.model.InstrumentBankData"%>

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN"
	dir="ltr">
<head>
<title>Moment Mobile Payments</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet"
	href="<%=request.getContextPath()%>/styles/layout.css" type="text/css" />
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="<%=request.getContextPath()%>/js/validation.js"></script>
<script>
	function hideform() {

		$('#instruForm').hide();

	}
	function showform() {
		$('#instruForm').show();
		$('#viewaccount').hide();

	}
</script>


</head>
<body id="top" onLoad="hideform()">
	<%@include file="loggedinheader.jsp"%>
	<%@ page import="org.json.*"%>
	<%@ page import="com.moment.model.*"%>

	<%@ page language="java" contentType="text/html; charset=UTF-8"
		pageEncoding="UTF-8"%>
	<%@page import="java.util.*"%>
	<%!String s[];%>
	<%!String saving, current;%>
	You are not logged in
	<br />
	<a href="index.jsp">Please Login</a>
	<jsp:useBean id="userObj" class="com.moment.model.UserReg"
		scope="session" />
	<div class="wrapper col3">

		<div id="intro">
			<div id="logout">
				<a href="/MMP/LogoutController"><img
					src="<%=request.getContextPath()%>/images/logout.png" alt="Logout" /></a>
			</div>
			<div class="fl_left1">

				<div id="login1">
					<div class="imgl">
						<img alt="Embedded Image" height="128" width="128"
							src="data:image/jpeg;base64,<jsp:getProperty name="userObj" property="imagestr" />" />
					</div>
				</div>
				<div id="instrumentsmain">
					<div>

						<h2>
							<center>View Instrument</center>
						</h2>
					</div>

					<jsp:useBean id="instrumentObj"
						class="com.moment.model.InstrumentBankData" scope="session" />

<style>
		.control-label {display:inline-block; width:250px;}
		.control-group {padding-bottom:10px;}
	</style>
					<form id="instruForm" name="viewaccount"
						action="../CardController" method="post">

			<div class="control-group">
				<label class="control-label" for="nickname">Instrument Name:</label>
				
					<input name="nickname" id="nickname" type="text" maxlength="15" value="<%=instrumentObj.getNickname()%>" class="required"/>
					<span style="display: none;" class="help-inline">Please fill instrument name</span>
				
			</div>
			<div class="control-group">
				<label class="control-label" for="instrumenttype">Instrument Type:</label>
				
					<select id="instrumenttype" name="instrumenttype">
										<option value="Account">Account</option>
					</select>				
			</div>
			<div class="control-group bank">
				<label class="control-label" for="bankAccno">Account No.:</label>
				
					<input type="text" name="bankAccno" id="bankAccno" value="<%=instrumentObj.getAccountno()%>" class="required"/>
					<span style="display: none;" class="help-inline">Please enter bank account number.</span>
				
			</div>
			<div class="control-group bank">
				<label class="control-label" for="bankName">Bank Name:</label>
				
					<input type="text" name="bankName" id="bankName" value="<%=instrumentObj.getBankname()%>" class="required"/>
					<span style="display: none;" class="help-inline">Please enter bank name.</span>
				
			</div>
										<%
								if (instrumentObj.getAccounttype().equalsIgnoreCase("saving")) {
									saving = "selected = selected ";
								} else {
									current = "selected = selected ";
								}
							%>
			<div class="control-group bank">
				<label class="control-label" for="acctype">Account Type:</label>
				
					<select id="acctype" name="acctype">
										<option value="CURRENT" <%=current%>>Current</option>
										<option value="SAVING" <%=saving%>>Saving</option>
					</select>
				
			</div>
			<div class="control-group">
				<label class="control-label" for="instruDlimit">Instrument Daily Limit:</label>
				
					<input type="text" name="instruDlimit" id="instruDlimit" value="<%=instrumentObj.getDlimit()%>" class="required numeric"/>
					<span style="display: none;" class="help-inline">Please enter numeric values only.</span>
				
			</div>
			<div class="control-group">
				<label class="control-label" for="instruMlimit">Instrument Monthly Limit:</label>
				
					<input type="text" name="instruMlimit" id="instruMlimit" value="<%=instrumentObj.getMlimit()%>" class="required numeric"/>
					<span style="display: none;" class="help-inline">Please enter numeric values only.</span>
				
			</div>


				<input type="hidden" id="updateorsave" name="updateorsave"
					value="update" />




				<div class="fl_right">
					<input type="submit" class="myButton" value="Update" /> 
				</div>
				</form>





				<form id="viewaccount" name="viewaccount" action=""
					method="post">

					<table>

						<tr>
							<td>Instrument Name:</td>
							<td><label><%=instrumentObj.getNickname()%></label></td>
						</tr>
						<tr>
							<td>Instrument Type:</td>
							<td>Account</td>
						</tr>
						<tr>
							<td>A/C No:</td>
							<td><label><%=instrumentObj.getAccountno()%></label></td>

						</tr>
						<tr>
							<td>Bank Name:</td>
							<td><label><%=instrumentObj.getBankname()%></label></td>
						</tr>

						<tr>
							<td>Account Type:</td>
							<td><label><%=instrumentObj.getAccounttype()%></label></td>
						</tr>
						</div>

						<tr>
							<td>Instrument D Limit</td>
							<td><label><%=instrumentObj.getDlimit()%></label></td>
						</tr>
						<tr>
							<td>Instrument M Limit</td>
							<td><label><%=instrumentObj.getMlimit()%></label></td>
						</tr>


					</table>




					<div class="fl_right">

						<input type="button" class="myButton" value="Edit" onClick="showform()"/>
					</div>
				</form>





			</div>

		</div>
	</div>
	</div>
	<br class="clear" />


	<%@include file="footer.jsp"%>


</body>
</html>

